package com.jerry.security.model;

import lombok.Data;

import javax.persistence.*;
import java.util.List;

/**
 * @author Jerry.Wu
 * @description:
 * @date 2018/9/3 16:27
 */
@Data
@Entity
@Table(name = "t_role")
public class Role extends IdEntity{

    private static final long serialVersionUID = 1L;

    private String name;

    @ManyToMany(mappedBy = "roles")
    @Basic(fetch = FetchType.LAZY)
    private List<User> users;

}
